<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>25-获取时间戳的三种方式</title>
</head>
<body>
    <script>
        // const date = new Date() // 实例化

        // console.log(date.getTime()) //1725334637381 需要实例化
        console.log(+new Date()) // 1725334683578 不需要实例化
        console.log(Date.now()) // 不需要实例化 1725334747175

        
    </script>
</body>
</html>